package com.retail.bbq.cola.controller;

import com.retail.bbq.cola.service.LawsonStampCollectionService;
import com.retail.bbq.cola.service.impl.LawsonStampCollectionServiceImpl;
import com.retail.bbq.cola.vo.ResultVO;
import com.retail.bbq.cola.vo.request.CheckDateRequest;
import com.retail.bbq.cola.vo.request.stampCollection.LawsonStampCollectionRequest;
import com.retail.bbq.cola.vo.response.stampCollection.LawsonStampCollectionExpirationReminder;
import com.retail.bbq.cola.vo.response.stampCollection.LawsonStampCollectionResponse;
import com.retail.bbq.cola.vo.response.stampCollection.LawsonStampCollectionTodoResponse;
import com.retail.bbq.cola.vo.response.stampCollection.LawsonStampPointFluctuationResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@Slf4j
public class LawsonStampCollectionController {

    @Resource
    private LawsonStampCollectionService lawsonStampCollectionService;

    @RequestMapping("/medal/customer/orderMedalList")
    public ResultVO<LawsonStampCollectionResponse> queryOrder(@RequestBody LawsonStampCollectionRequest request) {
        return ResultVO.succ(lawsonStampCollectionService.queryOrder(request));
    }


    @RequestMapping("/customer/orderMedalProcess")
    public ResultVO<LawsonStampCollectionTodoResponse> orderMedalProcess(@RequestBody LawsonStampCollectionRequest request) {
        //return ResultVO.succ(lawsonStampCollectionService.orderMedalProcess(request));
        return ResultVO.succ(lawsonStampCollectionService.newOrderMedalProcess(request));

    }

    @RequestMapping("/customer/stampExpirationReminder")
    public ResultVO<LawsonStampCollectionExpirationReminder> stampExpirationReminder(@RequestBody LawsonStampCollectionRequest request) {
        //return ResultVO.succ(lawsonStampCollectionService.stampExpirationReminder(request));
        return ResultVO.succ(lawsonStampCollectionService.newStampExpirationReminder(request));

    }
    
    /**
     * 查询用户积分波动情况接口
     * 用于获取用户新旧总积分值，支持前端实现增量积分动效展示
     * 
     * @param request LawsonStampCollectionRequest 包含buCode、oneid等信息的请求参数
     * @return ResultVO<LawsonStampPointFluctuationResponse> 返回旧总积分和新总积分
     */
    @RequestMapping("/customer/stampPointFluctuation")
    public ResultVO<LawsonStampPointFluctuationResponse> stampPointFluctuation(@RequestBody LawsonStampCollectionRequest request) {
        return ResultVO.succ(lawsonStampCollectionService.stampPointFluctuation(request));
    }


}
